LATEX		=	latex
PDFLATEX	=	pdflatex
MAKEINDEX	=	makeindex
DVIPS		=	dvips
DVIPDFMX	=	dvipdfm
BIBTEX		=	/usr/bin/bibtex

THESIS		=	gl
FILES		=	gl.tex \
			abstract.tex \
			intro.tex \
			model.tex \
			receiver.tex \
	#		bib.tex \
	#		res.tex 

.PHONY: all

all: $(THESIS).pdf

$(THESIS).dvi: $(FILES)
	$(LATEX) $(THESIS)
	$(LATEX) $(THESIS)
#	$(BIBTEX) $(THESIS)
	$(LATEX) $(THESIS)
	$(LATEX) $(THESIS)
#	$(MAKEINDEX) -o $(THESIS).ind $(THESIS)
	$(LATEX) $(THESIS)
	$(LATEX) $(THESIS)
	
$(THESIS).pdf: $(THESIS).dvi
	$(DVIPDFMX) $(THESIS).dvi


cl:
	rm -f *.aux *.toc *.lon *.lor *.lof *.ilg *.idx *.ind \
		*.out *.log *.exa *.bbl *.blg

dcl: cl
	rm -f *.pdf *.dvi *~

vw: $(THESIS).pdf
	evince $(THESIS).pdf

